using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace XiaoMan.Model.Models.Mapping
{
    public class Sys_DiseaseMap : EntityTypeConfiguration<Sys_Disease>
    {
        public Sys_DiseaseMap()
        {
            // Primary Key
            this.HasKey(t => t.DiseaseID);

            // Properties
            this.Property(t => t.DiseaseName)
                .HasMaxLength(50);

            this.Property(t => t.NickName)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("Sys_Disease");
            this.Property(t => t.DiseaseID).HasColumnName("DiseaseID");
            this.Property(t => t.DiseaseName).HasColumnName("DiseaseName");
            this.Property(t => t.DisplayOrder).HasColumnName("DisplayOrder");
            this.Property(t => t.DiseaseIsOn).HasColumnName("DiseaseIsOn");
            this.Property(t => t.MemberCount).HasColumnName("MemberCount");
            this.Property(t => t.TopicCount).HasColumnName("TopicCount");
            this.Property(t => t.AdminUserID).HasColumnName("AdminUserID");
            this.Property(t => t.NickName).HasColumnName("NickName");
        }
    }
}
